package mediadisplay.timeline 
{
	import flash.display.GradientType;
	import flash.display.SpreadMethod;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.geom.Matrix;
	/**
	 * ...
	 * @author Anders Figenschow
	 */
	public class EditArea extends Sprite
	{
		
		public function EditArea() 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
		
			var fType:String = GradientType.LINEAR;
			var colors:Array = [ 0xff0000, 0 ];
			var alphas:Array = [ 1, 1 ];
			var ratios:Array = [ 0, 255 ];
			var matr:Matrix = new Matrix();
			matr.createGradientBox( 70, stage.stageWidth, 0, 0, 0 );
			matr.rotate(Math.PI/2);
			var sprMethod:String = SpreadMethod.PAD;
			
			graphics.clear();
			graphics.beginGradientFill( fType, colors, alphas, ratios, matr, sprMethod );
			graphics.drawRect(0, 0, stage.stageWidth, 32);
			graphics.endFill();
		}
		
	}

}